<?php
namespace app\controller;

use think\Controller;

class Users extends Controller
{
    public function index() {
        $dc_token   = validateDcToken();
        $res = \NMClient\Api\User::getAccountDynamicPasswd($dc_token['access_token']);
        if ($res['status'] != 'ok') {
            echo $res['info'].'<br/>';
        }
        $this->assign('user', $res['data']);
        return $this->fetch('index');
    }
    public function regtis(){
        $user = [
            'id_xpp_user' => 0,
            'username' => 'admins',
            'nickname' => '',
            'secret' => 'xpp@12345678'
        ];
        $res = \NMClient\Api\Common::registerFromXPP($user);
        var_dump($res);
        
    }
}